<?php
namespace AuctionCore\AuctionCheckApi;
/**
* 回传系统各接口 测试类
* @author       Eric Lee
*/
class ApiTest extends \PHPUnit_Framework_TestCase {
    const EMP_ID = '198';
    const TOKEN = 'MDAwMDAwMDAwMH2hdrGxt2OxsIdjrIKpdN2zip_asMvSY4Biap2IZaqXfX6GsbHeeaOwroSugZiBzbR9gs6ypbBjgYaYaY53spaJoZiyvaiasQ';
	public static  function testApi(){?>

            <?php
            $json = '[{"cus_pos_name":"左前门内饰","describe":"脏污","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/car/2015-11-10/d27f/5c0c/d81b9517-db32-34f5-8d67-471e3c4000a3.jpg","http://clcw.oss-cn-beijing.aliyuncs.com/car/2015-11-10/d394/38dc/f974ea4a-0009-04b0-66db-dfe5fe1daa79.jpg","http://clcw.oss-cn-beijing.aliyuncs.com/car/2015-11-10/dbdf/95d0/9e5dfae6-b89c-e3fa-4fb5-04b08a1d965f.jpg"],"dm_degree":2,"position":1,"visible_type":1},{"cus_pos_name":"qqq","describe":"aaa","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/car/2015-11-10/dc06/402c/1c0bc8cb-b147-18ca-d373-68ef922be251.jpg","http://clcw.oss-cn-beijing.aliyuncs.com/car/2015-11-10/efcf/874b/121e6f7d-7c07-b52e-88fe-f10a2bdb5079.jpg"],"dm_degree":2,"position":21,"visible_type":1}]';
            $arr = json_decode($json,true);
            dump($arr,true,null,false);
            ?>

            <meta charset='utf-8'>
            <h1>接口测试</h1>
            <hr>
            <b>1,拍卖系统登录接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Auth/login" method="post" target="_blank"  >
            username:<input name="username" value="luxin" />               <br>
            password:<input name="passwd" type="password" value="<?=md5('123456')?>" />     <br>
            imei:    <input name="imei" type="text" value="013214008043855" />        <br>
            <input type="submit" name="submit" value="submit" />
            </form>

            <b>2,已完成列表接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_finished" method="post"  target="_blank" >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>车系ID:<input name="series_id" value="2704" />
                <br>审核状态:<input name="car_status" value="1" /> 1 待审核（即已导入）2 审核失败
                <br>检测开始时间:<input name="starttime" value="2012-09-28 00:00:00" />
                <br>检测结束时间:<input name="endtime" value="2016-10-28 00:00:00" />
                <br>currentPage:<input name="currentPage" value="1" />
                <br>pageSize:<input name="pageSize" value="20" />
                <br><input type="submit" name="submit" value="submit" />
            </form>

            <b>3,拍卖系统更新车型库接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_brand" method="post"  target="_blank" >
            <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
            <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
            <br>时间类型:<input name="type" value="1" />1,主品牌 2,品牌 3,车系 4,车型
            <br>最后更新时间:<input name="last_time" value="2012-09-28 00:00:00" />
                <br>currentPage:<input name="currentPage" value="1" />
                <br>pageSize:<input name="pageSize" value="100" />
                <br><input type="submit" name="submit" value="submit" />
            </form>

            <b>4,检查App版本接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Upgrade" method="post" target="_blank"  >
            sort:<input name="sort" value="1" />               <br>
            driver:<input name="driver"  value="1" />     <br>
            version:    <input name="version" type="text" value="1.1" />        <br>
            <input type="submit" name="submit" value="submit" />
            </form>

            <b>5,检查失败接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/check_fail" method="post" target="_blank"  >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>车主ID:<input name="owner_id" value="" />
                <br>检测失败原因:<textarea name="remark"></textarea>
                <input type="submit" name="submit" value="submit" />
            </form>

            <b>6,获取待检测接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_task" method="post" target="_blank"  >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <input type="submit" name="submit" value="submit" />
            </form>

            <b>7,审核中</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_auditing" method="post" target="_blank"  >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <input type="submit" name="submit" value="submit" />
            </form>

            <b>8,审核驳回</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_reject" method="post" target="_blank"  >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
            <input type="submit" name="submit" value="submit" />
            </form>

            <b>9,协议上传</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/upload_protocol" method="post" target="_blank"  enctype="MULTIPART/FORM-DATA" >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>车辆ID:<input name="car_id" value="" />
                <br>协议照片:<input type="file" name="image" />
                <br>过户限制:
                    <input type="radio" name="transfer_limit" value="1" />只能过本地
                    <input type="radio" name="transfer_limit" value="2" />只能外迁
                    <input type="radio" name="transfer_limit" value="3" />无限制
                <br>建议价格:<input name="suggest_max_price" value="" /> - <input name="suggest_min_price" value="" />
                <br>保留价格:<input name="reserve_price" value="" />

                <input type="submit" name="submit" value="submit" />
            </form>

            <b>10,图处上传接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Upload/image" method="post" target="_blank"  enctype="MULTIPART/FORM-DATA" >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>图片:<input type="file" name="pic" />
                <input type="submit" name="submit" value="submit" />
            </form>

            <hr>

            <b>10,文字上传接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Upload/text" method="post" target="_blank"  enctype="MULTIPART/FORM-DATA" >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>damage_info:<textarea name="damage_info" rows="5" cols="80">[{"cus_pos_name":"左前门内饰","describe":"脏污","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/fce2/e4c1/78be61b6-3652-781d-dbbc-a730cc0c6bc8.jpg"],"dm_degree":2,"position":1,"visible_type":1},{"cus_pos_name":"1","describe":"1","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/c505/c2d6/95479acc-eed6-dbf6-698b-439eae90c5e6.jpg"],"dm_degree":2,"position":21,"visible_type":1},{"cus_pos_name":"左前翼子板","describe":"划伤","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/2138/4949/eb5c9a1d-589a-8e40-12e3-777c10c1e79c.jpg"],"dm_degree":2,"position":22,"visible_type":2},{"cus_pos_name":"2","describe":"2","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/b7d2/2877/801e9ca5-41c7-acb4-a406-2b4b2e7c7fa4.jpg"],"dm_degree":2,"position":70,"visible_type":2},{"cus_pos_name":"水箱支架","describe":"裂痕","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/dc00/a7eb/5eed4c3f-761c-fec8-4c64-50e1c0cfde8c.jpg"],"dm_degree":2,"position":71,"visible_type":3},{"cus_pos_name":"左A柱","describe":"凹陷","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/2116/88f2/62fb266e-95dc-2cd8-f570-d4bc0ec09742.jpg"],"dm_degree":3,"position":78,"visible_type":3},{"cus_pos_name":"4","describe":"4","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/3cbc/dfa3/fbccc9d2-865b-0322-64e1-0b80592f0402.jpg"],"dm_degree":4,"position":94,"visible_type":3},{"cus_pos_name":"3","describe":"3","urls":["http://clcw.oss-cn-beijing.aliyuncs.com/2015-11-09/c51b/66e0/9e6a8866-08e3-fce6-f2a9-d78c47a47f95.jpg"],"dm_degree":3,"position":95,"visible_type":3}]</textarea>
                <input type="submit" name="submit" value="submit" />
            </form>

            <hr>

            <b>10,车辆详情接口</b>
            <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_car" method="post" target="_blank"  enctype="MULTIPART/FORM-DATA" >
                <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
                <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
                <br>车辆ID:<input name="car_id" value="13" />
                <input type="submit" name="submit" value="submit" />
            </form>

            <hr>
        <b>11,获取协议中列表</b>
        <form action="http://liguohua.checkapi.paimai.clcw.com.cn/Query/get_protocol" method="post" target="_blank"  >
            <br>员工ID:<input name="emp_id" value="<?=self::EMP_ID?>" />
            <br>令牌:<input size="150" name="token" value="<?=self::TOKEN?>" />
            <input type="submit" name="submit" value="submit" />
        </form>

    <?php
    }
}